package com.boxin.ims.modules.wechat.busi.metal;

import org.springframework.stereotype.Service;

import com.boxin.ims.modules.wechat.busi.BusinessProcessor;
import com.boxin.ims.modules.wechat.busi.ProcessMessage;

/**
 * @author Administrator
 * @date 2014-3-19
 * @function <p>贵金属价格走势图 </p>
 */
@Service
public class MetalTrendProcessor  extends BusinessProcessor{

	@Override
	public ProcessMessage process() {
		String keyword = textMessage.getContent();
		
		String title = "";
		String url = "http://jiage.me/PriceList/price.php?type=guojiyin";	//国际现货白银		by
		if("byt".equalsIgnoreCase(keyword)){						//国际现货白银
			title="【现货白银走势图】";
			url = "http://www.kitco.cn/cn/live_charts/t24_ag_ch_usoz_163x111.gif";
		}else if("hjt".equalsIgnoreCase(keyword)){			////国际现货黄金
			title = "【现货黄金走势图】";
			url = "http://www.kitco.cn/cn/live_charts/kitcocn/t24_au_rmbg_cn.gif";	
		}else if("zbyt".equalsIgnoreCase(keyword)){
			title ="【白银走势图】";
			url = "http://www.kitco.cn/cn/live_charts/kitcocn/t24_ag_rmbg_cn.gif";		//	纸白银
			
		}else if("zhjt".equalsIgnoreCase(keyword)){
			title ="【黄金走势图】";
			url = "http://www.kitco.cn/cn/live_charts/kitcocn/t24_au_rmbg_cn.gif";		//纸黄金
			
		}else if("zbait".equalsIgnoreCase(keyword)){							//纸铂金
			title ="【铂金走势图】";
			url = "http://www.kitco.cn/cn/live_charts/kitcocn/t24_pt_rmbg_cn.gif";		//纸黄金
			
		}else if("mzt".equalsIgnoreCase(keyword)){
			title="【美元指数走势图】";
			url = "http://www.kitco.cn/cn/live_charts/t24_usd_cn188x166.gif";		//美元指数			mz
		}else if("oy".equalsIgnoreCase(keyword)){							//欧元指数
			title="【欧元指数】";
		}
		
		String tourl = "http://www.hdzhx.com/mobile/priceTrend.jsp?title="+title+"&url="+url;
		
		//回复单图文
		writeImageToUser(title, "", url,tourl);
		
		
		return null;
	}

	@Override
	public boolean isNeedBeMember() {
		// TODO Auto-generated method stub
		return false;
	}

}
